<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <div id="test" style="height: 100px;"></div>
    <script>
    //string-->number;
    // Tip:第一位必须为数字 
    var test = document.getElementById("test");
    var height  =test.style.height;
    console.log(parseInt(height));
    test.onclick = function(){
        this.style.height = parseInt(this.style.height)+1+"px";
    }
    var a = "12px";
    var b = "a13px";
    var c = "13.45px";
    console.log(parseInt(a));//100 数字 亮色
    console.log(parseInt(b));//12
    console.log(parseInt(c));//13
    console.log(parseFloat(c));//13.45
    
    </script>
</body>
</html>